home *** CD-ROM | disk | FTP | other *** search
/ .net (French) 1996 November / .net Magazine (FR) - Issue 01 - Nov 1996.iso / mac / Edition Web / HTMLedit173-ppc / HTML.edit 1.7.3 (ppc) / HTML.edit 1.7.3 (ppc).rsrc / TEXT_12924_Document Structure.txt < prev    next >
Text File  |  1996-09-16  |  6KB  |  83 lines

  1.  
  2. Document Structure
  3.  
  4. HTML structural elements provide no change of appearance to your document, but provide important information to the remote browser about your document, such as the type of document being transmitted, its title, whether it is an index to other documents, etc. In an environment where HTML is potentially only one document type of many (with even SGML browsers available), it is recommended that you use structural elements to identify your HTML documents.
  5.  
  6. The HTML specification does not require documents to use all HTML structural elements (in fact, the only required element is <TITLE>), but following closer to form makes for more compliance with HTML and SGML client browsers. Also, browsers are now becoming available that can download only the document header to allow a client to determine if they want the rest of the document.
  7.  
  8. The Structure submenu (under the HyperText menu) includes the structural commands, as well as the commands found on the Header, Body and Footer popUp menus. You can add all the structural elements to a document at once by choosing the All Structural Tags command.
  9.  
  10. SOAPBOX NOTE:  A browser may be provoked to perform strange antics by including multiple copies of various structural elements, such as BODY and TITLE. While this may appear cute, incorrect SGML/HTML structure potentially will cause the document to fail on other browsers, and goes counter to the purpose of good document design: to promote widespread viewing of the document.
  11.  
  12. HTML Structural Elements
  13.  
  14. SGML Prologue
  15. The first (and optional) element of an HTML document is the HTML Formal Public Identifier (FPI), which is a declaration of the language used in the document. This is in the form of an SGML prologue, or "document type" element. The parameters point to a description of the HTML language in a DTD (Document Type Description) format. Note that the <!DOCTYPE> element has no ending "</" tag:
  16.  
  17.    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  18.  
  19. Lacking an SGML prologue, the HTTP server assigns to documents with the filename extension ".html" the default MIME type "text/html".
  20.  
  21. HTML Tags
  22. The beginning and end of an HTML document is marked with the HTML language tags <HTML> and </HTML>. If an SGML Prologue is used (see above), the initial <HTML> tag follows the prologue.
  23.  
  24. Header Tags
  25. An HTML document header is delimited with the tags <HEAD> and </HEAD>. The document header contains information used by a browser program to navigate and keep track of document history, and shouldn't  contain any document content, other than the document title and optional HTML comments.
  26.  
  27. Title Tags
  28. All HTML documents should have a document title, enclosed by <TITLE> and </TITLE> tags. The document title should be placed between the <HEAD> and </HEAD> tags.
  29.  
  30. Body Tags
  31. The document body is delimited with the tags <BODY> and </BODY>. All document content should reside between these body tags. The document body follows the header section, with the closing </HTML> tag (if used) following the closing </BODY> tag.
  32.  
  33. Footer Separator
  34. The optional <!--FOOT--> comment is used to separate the Body and Footer areas (used in HTML.edit only, see the next section below). This comment must be placed between the <BODY> and </BODY> tags.
  35.  
  36. HTML.edit Structure vs. HTML Document Structure
  37. HTML.edit uses three text areas to compose a document: the Header area, Body area, and Footer area. These are concatenated (ie., added together sequentially) when the document is exported. HTML's <HEAD> and <BODY> sections correspond loosely to HTML.edit's insofar as function, and you may divide your document within the three HTML.edit text areas any way you wish so long as the concatenated document conforms to the HTML placement as described above and shown below. The Footer area is not necessary and only useful in creating a common footer for a set of documents.
  38.  
  39. Sample
  40. A sample structure is shown below, complete with recommended divisions for Header, Body and Footer sections:
  41.  
  42. ΓÇöΓÇöΓÇöΓÇöΓÇö start of HTML.edit Header area ΓÇöΓÇöΓÇöΓÇöΓÇö
  43. <!DOCTYPE>        [optional]
  44. <HTML>
  45. <HEAD>
  46. <TITLE>Document Title</TITLE>
  47. </HEAD>
  48. ΓÇöΓÇöΓÇöΓÇöΓÇö start of HTML.edit Body area ΓÇöΓÇöΓÇöΓÇöΓÇö
  49. <BODY>
  50.  
  51.      [Your document content goes hereΓǪ]
  52.  
  53. ΓÇöΓÇöΓÇöΓÇöΓÇö start of HTML.edit Footer area ΓÇöΓÇöΓÇöΓÇöΓÇö
  54. <!--FOOT-->        [optional]
  55. <ADDRESS>
  56.      [The author's address information goes here]
  57. </ADDRESS>
  58. </BODY>
  59. </HTML>
  60. ΓÇöΓÇöΓÇöΓÇöΓÇö end of HTML.edit Footer area ΓÇöΓÇöΓÇöΓÇöΓÇö
  61.  
  62.  
  63. Since HTML.edit concatenates the Header+Body+Footer text areas on exported text files using the Export command, you could conceivably put the entire contents of your file within any one of the text areas, and you would obtain the same exported document. The "All Structural Tags" command (found under the HTML menu on the palette) adds the HTML structure tags as shown above, and parses the text accordingly.
  64.  
  65. If you are trying to create a standard header "look", locate the beginning <BODY> tag after the </HEAD> tag in the Header area, and put your standard HTML code following it, but still within the Header area, as in:
  66.  
  67. ΓÇöΓÇöΓÇöΓÇöΓÇö start of HTML.edit Header area ΓÇöΓÇöΓÇöΓÇöΓÇö
  68. <!DOCTYPE>        [optional]
  69. <HTML>
  70. <HEAD>
  71. <TITLE>Document Title</TITLE>
  72. </HEAD>
  73. <BODY>
  74.      [Master Header text here...]
  75. ΓÇöΓÇöΓÇöΓÇöΓÇö start of HTML.edit Body area ΓÇöΓÇöΓÇöΓÇöΓÇö
  76.  
  77.      [Your document content hereΓǪ]
  78.      [etc.]
  79.  
  80. For related information, check the HyperText menu's Structure submenu.
  81.  
  82. Back to Paths and Filenames, on to Long Documents, or return to Design Issues.
  83.